Compressor components may allow applications to assert some control over the image quality that results from a compression or decompression operation. For example, the CompressSequenceBegin function (described on CompressSequenceBegin ) provides the spatialQuality and temporalQuality parameters so that applications can indicate the level of image accuracy desired within individual frames and across adjacent frames in a sequence, respectively. These quality values become a property of the compressed data and are stored in the image description structure (described on The Image Description Structure ) associated with the image or sequence.
For a given compression operation, your application can determine the quality that the component supports by issuing the GetCompressionTime function (described on GetCompressionTime ).
The CodecQ data type defines a field that identifies the quality characteristics of a given image or sequence. Note that individual components may not implement all the quality levels shown here. In addition, components may implement other quality levels in the range from codecMinQuality to codecMaxQuality . Relative quality should scale within the defined value range. Values above codecLosslessQuality are reserved for use by individual components.
/* compression quality values */
#define codecMinQuality 0x000L /* minimum valid value */
#define codecLowQuality 0x100L /* low-quality reproduction */
#define codecNormalQuality
0x200L /* normal-quality repro */
#define codecHighQuality
0x300L /* high-quality repro */
#define codecMaxQuality 0x3FFL /* maximum-quality repro */
#define codecLosslessQuality
0x400L /* lossless-quality repro */
typedef unsigned long CodecQ;